<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Windows_type extends Model {
	protected $table = 'windows_type';
	protected $guarded = ['id'];
	public $timestamps = false;

	public function children()
    {
        return $this->hasMany('App\Models\Windows_type','pid','id');
    }

    public function windows()
    {
        return $this->hasMany('App\Models\Windows','type_id','id');
    }

    public function pwindows_type()
    {
        return $this->hasone('App\Models\Windows_type','id','pid');
    }
	
}
